package com.iris.egrantweb;

import com.iris.egrant.model.proposal.Proposal;
import com.iris.egrant.remote.http.service.ServiceFactory;
import com.iris.egrant.service.proposal.ProposalService;
import com.opensymphony.xwork2.ActionSupport;

import javax.annotation.Resource;

public class HelloWorldAction extends ActionSupport {
    @Resource(name = "serviceFactory")
    private ServiceFactory serviceFactory;

    public String execute() throws Exception {

        ProposalService proposalService =  ((ProposalService)this.serviceFactory.getService(ProposalService.class));
        Proposal proposalByCode = proposalService.getProposalByCode(100011225L);

//        FormBaseLibraryDao formBaseLibraryDao =  ((FormBaseLibraryDao)this.serviceFactory.getService(FormBaseLibraryDao.class));
//        FormBaseLibrary model = formBaseLibraryDao.getFormBaseLibraryByFormId(101L);
        return SUCCESS;
    }
}